﻿
using Foothill.IoC;
using Foothill.Service.AdService;
using Foothill.Service.Caching;
using Foothill.Service.Configuration;
using Foothill.Service.Email;
using Foothill.Service.MiscInfo;
using Foothill.Service.Security;
using Foothill.Service.Session;
using Foothill.Service.SystemMessage;
using Foothill.Service.UploadPhoto;
using Foothill.Service.UserAccount;
using Foothill.Service.Validation;
using Foothill.Service.VehicleInfo;

namespace Foothill.Service
{
    public class ServiceIocModule : IocModule
    {
        public override void RegisterTypes()
        {
            Register<IAccountRegistrationManager, AccountRegistrationManager>();
            Register<IAdListFilter, AdListFilter>();
            Register<IAdminSearchService, AdminSearchService>();
            Register<IAdSearchService, AdSearchService>();
            Register<IAdService, Foothill.Service.AdService.AdService>();
            Register<IAuthenticationService, AuthenticationService>();
            Register<ICustomConfigurationManager, CustomConfigurationManager>();          
            Register<IEmailSender, EmailSender>();
            Register<IEmailService, EmailService>();
            Register<IHashUtility, HashUtility>();
            Register<IHtmlSanitizer, HtmlSanitizer>();
            Register<IHostSettingManager, HostSettingManager>();           
            Register<IImageProcessor, ImageProcessor>();
            Register<ILocalCache, LocalCache>(InstanceLifetime.Singleton);
            Register<IMiscInfoService, MiscInfoService>();
            Register<IPostValidator, PostValidator>(InstanceLifetime.Singleton);
            Register<IReorderService, ReorderService>();
            Register<ISearchResultStatsCalculator, SearchResultStatsCalculator>();
            Register<ISessionService, SessionService>(InstanceLifetime.HttpContext);
            Register<IStringGenerator, StringGenerator>();
            Register<ISystemMessageService, SystemMessageService>();
            Register<IUploadFileManager, UploadFileManager>();
            Register<IUploadPhotoService, UploadPhotoService>();
            Register<IUserAccountService, UserAccountService>();
            Register<ISecurityService, SecurityService>();
            Register<IUserContextService, UserContextService>(InstanceLifetime.HttpContext);
            Register<IValidationService, ValidationService>();
            Register<IVehicleInfoService, VehicleInfoService>();
        }
    }
}
